package com.itheima.d6_tcp3.ZengTCpTest;

import java.io.IOException;
import java.io.InputStream;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @ClassName server
 * @Author 16799
 * @Date 2025/9/26 19:47
 * @Version 1.0
 * @Description TODO
 **/
public class server {
    public static void main(String[] args) throws Exception {
        System.out.println("---------------服务端启动成功---------------");
        ServerSocket serverSocket = new ServerSocket(8877);

        while (true){
            Socket socket = serverSocket.accept();
            System.out.println("有客户端上线了： " + socket.getRemoteSocketAddress());
            new serverThread(socket).start();
        }
    }
}
